package com.coder.oj.common.core;

/**
 * 缓存当前用户id
 * @author Bosen 2022/11/25 15:19
 **/
public class BaseContext {

    private static final ThreadLocal<Long> threadLocal = new ThreadLocal<>();

    public static void setCurrentId(Long id){
        threadLocal.set(id);
    }

    public static Long getCurrentId(){
        return threadLocal.get();
    }
}
